<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <title>while语句</title>
    <script>
        /*
            初始表达式
            while(判断条件){
                循环体;
                步进语句;
            }
        */

        var i = 1;
        while (i <= 5) {
            console.log(i);
            i++;
        }

    </script>
</head>

<body>
</body>